package com.sunxu.exercise3;

/**
 * ${DESCRIPTION}
 *
 * @author Sun
 * @create 2017-08-01-20:23
 */
public class ProxySubject extends Subject {
    // 以真实角色作为代理角色的属性
    private Subject realSubject;

    public ProxySubject(Subject realSubject) {
        this.realSubject = realSubject;
    }

    @Override
    public void request() {
        System.out.println("11111");
        realSubject.request();
        System.out.println("2222");
    }
}
